
import request from '@/utils/request';
import { ResultResource } from './definitions/ResultResource';
import { ResultListResourceResponse } from './definitions/ResultListResourceResponse';


export class ResourceAdminController {

    static addUsingPOSTPath: string = "/v1/admin/resource";
    /// 新增资源
    async addUsingPOST( headers?: any):  Promise<ResultResource> {
      return request(`/v1/admin/resource`, {
        method: "POST",
        data: null ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static listUsingGETPath: string = "/v1/admin/resource/list";

    async listUsingGET(roleId: any,  headers?: any) : Promise<ResultListResourceResponse> {
      return request(`/v1/admin/resource/list?roleId=${roleId ?? "" }`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
}